﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CMS.BLL;

public partial class news_ImageManage_delete : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string flag = Request["flag"];
        if (flag == "list")
        {
            ImageManageListBLL bll = new ImageManageListBLL();
            long id = long.Parse(Request["id"]);
            var c= bll.GetOne(id);
            bll.Delete(id);
            CacheClearBLL.ClearLike(c.Fid);
            ClientScript.RegisterStartupScript(GetType(), "aa", "alert('删除成功');document.location='edit.aspx?id="+c.Fid+"'",true);
        }
        else
        {
            ImageManageBLL bll = new ImageManageBLL();
            string id=Request["id"];
            bll.Delete(id);
            CacheClearBLL.ClearLike(id);
            ClientScript.RegisterStartupScript(GetType(), "aa", "alert('删除成功');document.location='Default.aspx'",true);
        }
    }
}